// axios请求接口
import axios from '&helpers/axios'

export const reqUploadFile = (params) => {
  params.grade = localStorage.getItem("grade")
  let formData = new FormData()
  for(let props in params){
    formData.append(props,params[props])
  }

  return axios({
    url: "/matrix/upload",
    method: 'post',
    data: formData
  })
}

export const reqGetHeader = (params) => {
  return axios({
    url: "/matrix/getHead",
    method: 'get',
    params:params
  })
}

export const reqGetList = (params) => {
  params.grade = localStorage.getItem("grade")
  const formData = new FormData()
  for(let prop in params){
  formData.append(prop,params[prop])
  }
  return axios({
    url: "/matrix/list",
    method: 'post',
    data:formData
  })
}
